<style type="text/css">
.login-title{
	font-family: 'Droid Sans';
	font-size:12px;
	color:#fff;
}
.form-group{
	width: 100%;
	margin: 0;
	padding:0;
	border: 0;
}
.login-form{
	padding:0;
	width: 100%;
	height:300px;
	text-align:center;     
}
.control-label{
	width: 200px;
	border: 0;
}
.forgot-confirm{
	margin:0;
}
.forgot{
	text-align:left;
	padding:0 0 0 15%;
}
.copy{
	text-align:left;
}
.loading{
	display:none;
	color:#ff0000;
}
</style>
<div class='buybid-box'>
	<div class='buybid-top'>
		<div class='buybid-title'>Registration</div>
	</div>
</div>
<div class='row region region-login'>
		
		<div class='col-xs-6 login-form '>
		
			<div class="form-group forgot">
				Welcome and thank you for registering with eGunner.com. <br><br>

You will receive an email momentarily with your account information.  <br><br>
Please follow the link within the email to confirm your account and prove you are who you say you are.<br><br> 

Please check your spam filter as these automated emails can sometimes get hung up.<br><br>

Thank you,<br><br>
				<p class='copy'>- Team eGunner</p>
				<!--  activate_account.php?option=resend_email -->
				<p >[<a style='margin: 0;' href="javascript:;" id="sendmail">Re-send Activation Email</a>]<span class='loading' >sending...<img alt="" src="<?php echo Yii::app()->resource->path('img').'/loading.gif';  ?>" width="15" ></span></p>
			</div>
            
		</div>
	</div>
	<?php 
	/**
	 * ajax 验证egunner用户状态
	 * 接口/register/getmail CURL跨越访问Egunner接口获取数据
	 * is_approve->true：已验证
	 * is_send->true：已发送邮件 
	 */
           Yii::app()->clientScript->registerScript('sendmail',"
               function jsonpCallback(result) {  
 
                        alert(123);
                    }
                $('#sendmail').on('click',function(){
                   $.ajax({
                        url:'".Yii::app()->params['site_url']."/register/getmail',
                        type:'POST',
                        dataType:'json',
                        data:{username:'".$username."'},
                        beforeSend:function(){
                            $('.loading').show();
                        },
                        success:function(data){
                            console.log(data);
                            $('.loading').hide();
                                if(data.is_approve==true){
                                    alert('Mail has confirmed');
                                    location.href='".Yii::app()->params['site_url']."/login';
                                }
                                if(data.is_send==true){
                                    alert('Mail sent successfully, please check in your mailbox');
                                }
                        }  
                    })
                }) 
               
           ")
    ?>